﻿<%@ Page Title="" Language="C#" ValidateRequest="false" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="CNTinTuc.aspx.cs" Inherits="Admin_TinTuc_CNTinTuc" %>

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HomePlaceHolder" Runat="Server">
    <script type="text/javascript">
        var GB_ROOT_DIR = "../../GREY_BOX/";
    </script>
    <script language="javascript" type="text/javascript">
        function Upload_HinhAnh() {
            var sFileName = document.getElementById('<%=H_AnhDaiDien.ClientID%>').value;
            var url = "../Admin/TinTuc/UploadImage.aspx?sFileName=" + sFileName;
            return GB_showCenter('Tải ảnh đại diện', url, 220, 500);
        }
        function Insert_Image(imgPath, imgName) {
            document.getElementById('<%=imgViewer.ClientID%>').src = imgPath;
            document.getElementById('<%=H_AnhDaiDien.ClientID%>').value = imgName;
        } 
    </script>
    <script src="../../GREY_BOX/AJS.js" type="text/javascript"></script>
    <script src="../../GREY_BOX/AJS_fx.js" type="text/javascript"></script>
    <script src="../../GREY_BOX/gb_scripts.js" type="text/javascript"></script>
    <div class="hrm_header_placeholder">
        Tạo mới Tin tức</div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="float: right; left: 0">
                <table border="0" width="100%" align="left" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="100%" height="105" style="padding-left: 25px">
                            <asp:Image ID="imgViewer" ToolTip="Ảnh Đại Diện" runat="server" ImageUrl="~/Images/no_image.jpg"
                                CssClass="imgviewer" onclick="JavaScript:Upload_HinhAnh()" Width="130" Height="105" />
                        </td>
                    </tr>
                    <tr>
                        <td style="padding: 5px">
                            &nbsp;&nbsp;(Kích vào hình để tải ảnh đại diện)
                        </td>
                    </tr>
                </table>
            </div>
            <div style="padding: 10px; float: left">
                <asp:HiddenField ID="H_CatalogId" Value="" runat="server" />
                <asp:HiddenField ID="H_AnhDaiDien" Value="" runat="server" />
                <asp:HiddenField ID="HiddenField1" Value="0" runat="server" />
                <asp:HiddenField ID="H_LuotXem" Value="0" runat="server" />
                <table border="0" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td colspan="4" height="4">
                        </td>
                    </tr>
                    <tr>
                        <td width="20">
                        </td>
                        <td width="100" class="hrm_title_blue">
                            Tiêu đề
                        </td>
                        <td width="7" class="hrm_title_blue">
                            :
                        </td>
                        <td width="400">
                            <asp:TextBox ID="txtTieuDe" CssClass="hrm_textbox" Width="400px" MaxLength="100"
                                runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" SetFocusOnError="True"
                                ControlToValidate="txtTieuDe" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" height="4">
                        </td>
                    </tr>
                    <tr>
                        <td width="20">
                        </td>
                        <td width="100" class="hrm_title_blue" valign="top">
                            Tóm tắt
                        </td>
                        <td width="7" class="hrm_title_blue" valign="top">
                            :
                        </td>
                        <td width="400">
                            <asp:TextBox ID="txtTomTat" Height="100px" Width="400px" TextMode="MultiLine" CssClass="hrm_textbox"
                                runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" SetFocusOnError="True"
                                ControlToValidate="txtTomTat" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" height="4">
                        </td>
                    </tr>
                    <tr>
                        <td width="20">
                        </td>
                        <td width="100" class="hrm_title_blue" valign="top">
                            Nội dung
                        </td>
                        <td width="7" class="hrm_title_blue" valign="top">
                            :
                        </td>
                        <td>
                            <FTB:FreeTextBox ID="txtNoiDung" ImageGalleryPath="~/Upload/TinTucND" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|InsertImageFromGallery,InsertTable,Preview,WordClean"
                                runat="Server" Width="600px" Height="300px" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" SetFocusOnError="True"
                                ControlToValidate="txtNoiDung" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" height="4">
                        </td>
                    </tr>
                    <tr>
                        <td width="20">
                        </td>
                        <td width="100" class="hrm_title_blue">
                            Trạng thái
                        </td>
                        <td width="7" class="hrm_title_blue">
                            :
                        </td>
                        <td>
                            <asp:CheckBox ID="chkTrangThai" Checked="true" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" height="10">
                        </td>
                    </tr>
                    <tr>
                        <td width="20">
                        </td>
                        <td width="100" class="hrm_title_blue">
                        </td>
                        <td width="7" class="hrm_title_blue">
                        </td>
                        <td>
                            <asp:ImageButton ID="cmdLuu" ImageUrl="~/Images/save.jpg" runat="server" OnClick="cmdLuu_Click" />
                            <asp:ImageButton ID="cmdNhapTiep" ImageUrl="~/Images/nhaptiep.jpg" CausesValidation="false"
                                runat="server" OnClick="cmdNhapTiep_Click" />
                            <asp:ImageButton ID="cmdQuayLai" CausesValidation="false" ImageUrl="~/Images/quaylai.jpg"
                                runat="server" PostBackUrl="~/Admin/TinTuc/QLTinTuc.aspx" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" height="20">
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="cmdLuu" />
            <asp:AsyncPostBackTrigger ControlID="cmdNhapTiep" />
            <asp:AsyncPostBackTrigger ControlID="cmdQuayLai" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>

